#ifndef CONTROLLERUSERCONFIG_H
#define CONTROLLERUSERCONFIG_H

#include <QObject>

#include "datauser.h"
#include "datavocabulary.h"

//单例模式--局部静态变量实现
class UserConfig
{

public:
    ~UserConfig();
    UserConfig(const UserConfig&) = delete;//显示删除默认构造函数
    UserConfig& operator=(const UserConfig&) = delete;//显示删除操作符=

    static UserConfig& getInstance();//获取唯一实例

    bool isUserConfiged();

    QList<Vocabulary> getAllVocabulary();

    bool updateUserConfig(const User& user);

    User getUser();


private:
    UserConfig();
    User user;
};

#endif // CONTROLLERUSERCONFIG_H
